/**
 * Apr 2, 2011
 * 8:39:56 PM
 * Timiz
 * kukujun@gmail.com
 *cn.lastjune.service.impltimiz-project-dpAreaServiceImpl
 */
package cn.lastjune.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.lastjune.dao.AreaDao;
import cn.lastjune.pojo.Area;
import cn.lastjune.service.AreaService;
import cn.lastjune.util.Page;

/**
 * @author Timiz
 *         kukujun@gmail.com
 */
@Service
@Transactional
public class AreaServiceImpl implements AreaService
{

    @Autowired
    AreaDao dao;

    @Override
    public Page<Area> getAllArea(Page<Area> page)
    {
        return dao.getPageAll(page);
    }

    @Override
    public Area getAreaById(String id)
    {
        return dao.getAreaByID(id);
    }

    @Override
    public void insertArea(Area entity)
    {
        dao.add(entity);
    }

    @Override
    public void deleteArea(String id)
    {
        dao.delete(id);
    }

    @Override
    public void updateArea(Area entity)
    {
        dao.update(entity);
    }

}
